package com.team.student.test;

import com.github.pagehelper.PageInfo;
import com.team.student.entity.Stu;
import com.team.student.service.FindStuAndGrade;
import com.team.student.service.impl.FindStuAndGradeIml;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class GetAllStuLim {
    public static void main(String[] args) {
        ApplicationContext cac = new ClassPathXmlApplicationContext("applicationContext.xml");
        FindStuAndGrade findStuAndGrade = (FindStuAndGrade) cac.getBean("findStuAndGradeIml");

        PageInfo<Stu> allStuLim = findStuAndGrade.getAllStuLim(1, 3);

        System.out.println("页码"+allStuLim.getPageNum()+
                "页码大小"+allStuLim.getPageSize()+
                "总页数"+allStuLim.getPages()+
                "学生信息:"+allStuLim.getList()+
                "上一页:"+allStuLim.getPrePage()+
                "下一页:"+allStuLim.getNextPage());


    }
}
